Not able to get the relevant value from array getting Uncaught TypeError Cannot use 'in' operator to